package com.ruoyi.system.api;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteSjsjFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * 数据世界服务
 *
 * @author jingma
 */
@FeignClient(contextId = "remoteSjsjService", value = ServiceNameConstants.SJSJ_SERVICE, fallbackFactory = RemoteSjsjFallbackFactory.class)
public interface RemoteSjsjService
{
    /**
     * 数据世界统一接口
     *
     * @param myParams 参数体信息
     * @return 结果
     */
    @PostMapping(value = "/default")
    R<JSONObject> index(@RequestBody JSONObject myParams);
    /**
     * 数据世界统一上传接口
     *
     * @param myParams 参数体信息
     * @return 结果
     */
    @PostMapping(value = "/default", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    R<JSONObject> upload(@RequestBody JSONObject myParams, @RequestPart(value = "files") MultipartFile[] files);
}
